#include<stdio.h>

int fact(int n);
void print_number(int n);
void print_space(int n);

int main()
{
	int n;
	scanf("%d", &n);
	for (int i = 1; i <= n; i++)
	{
		print_number(i - 1);
		printf("\n");
	}
	return 0;
}

int fact(int n)
{
	int sum = 1;
	for (int i = 1; i <= n; i++)
		sum = sum * i;
	return sum;
}
void print_number(int n)
{
	for (int i = 0; i <= n; i++)
	{
		printf("%6d", fact(n) / fact(i) / fact(n - i));
	}
}
void print_space(int n)
{
	for (int i = 0; i < n; i++)
	{
		printf(" ");
	}
}